/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task07.task0722;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

/* 
结束
*/

public class Solution {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        //在此编写你的代码
        ArrayList<String> list = new ArrayList<String>();
        while (true) {
            String temp = reader.readLine();
            if (temp.equals("结束")) {
                break;
            }
            list.add(temp);
        }
        for (String s : list) {
            System.out.println(s);
        }

    }
}